package com.linkage.repository.background;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.linkage.pojo.commodity.Book;
import com.linkage.pojo.commodity.Category;

/**
 * @标题：图书后台管理接口
 * @描述：图书操作接口
 * @author: 邓达
 */

@Repository
public interface BookManageRepository {
	
	
	// 添加新的图书
	public boolean addNewBook(Book book);
	
	//保存图书
	public void saveBook(Book book);
	
	//列出所有图书
	public List<Map<String, Object>> listAllBooks();
	
	//编辑图书
	public boolean editBook(Book book);
	
	//更改书本状态
	public void changeBookStatus(@Param("bookId") Integer bookId,@Param("newStatus") Boolean newStatus);
	
	
	public  List<Map<String, Object>> listSpecialList();

	//根据ID得到一本书
	public Book getBookByID(Integer bookId);
	
}
